/*******************************************************************************
 * Copyright (c) Jerges A. Bello G. 2014. Reservado todos los derechos.
 ******************************************************************************/
package com.jabex.persistence.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToMany;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import java.util.Date;
import java.util.List;

/**
 * Created by jaugusto on 28/08/14. *
 */
@Entity
@Table(name = "ADA_PROVIDER")
public class Provider extends Identity {
	@Column(name = "NAME", unique = false, nullable = false)
	private String name;
	@Column(name = "CIF", unique = false, nullable = false)
	private String cif;
	@Column(name = "TELEPHONE", length = 50, unique = false, nullable = true)
	private String telephone;
	@Column(name = "DIRECTION", length = 100, unique = false, nullable = true)
	private String direction;
	@Column(name = "CODE_POSTAL", length = 12, unique = false, nullable = true)
	private int codePostal;
	@Column(name = "DESCRIPTION", unique = false, nullable = false)
	private String description;
	@ManyToMany(fetch = FetchType.LAZY)
	private List<Business> businessList;
	@Column(name = "CREATE_DATE", unique = false, nullable = true)
	private Date createDate;
	@Column(name = "ACTIVE", unique = false, nullable = false)
	private Boolean isActive;
	@OneToMany(fetch = FetchType.LAZY)
	private List<Product> productList;


	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCif() {
		return cif;
	}

	public void setCif(String cif) {
		this.cif = cif;
	}

	public String getTelephone() {
		return telephone;
	}

	public void setTelephone(String telephone) {
		this.telephone = telephone;
	}

	public String getDirection() {
		return direction;
	}

	public void setDirection(String direction) {
		this.direction = direction;
	}

	public int getCodePostal() {
		return codePostal;
	}

	public void setCodePostal(int codePostal) {
		this.codePostal = codePostal;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public List<Business> getBusinessList() {
		return businessList;
	}

	public void setBusinessList(List<Business> businessList) {
		this.businessList = businessList;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public Boolean getIsActive() {
		return isActive;
	}

	public void setIsActive(Boolean isActive) {
		this.isActive = isActive;
	}

	public List<Product> getProductList() {
		return productList;
	}

	public void setProductList(List<Product> productList) {
		this.productList = productList;
	}
}
